<template>
    <div class="footer">
        <el-container style="height: 1000px; border: 1px solid #eee">
            <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
                <el-menu :default-openeds="['1', '3']">
                    <el-submenu index="1">
                        <template slot="title"><i class="el-icon-menu"></i>我的订单</template>
                        <el-menu-item index="1-1" @click="goPage('/order_manage')"
                                      :class="{active: url_path === '/order_manage'}">订单管理
                        </el-menu-item>
                    </el-submenu>
                    <el-submenu index="2">
                        <template slot="title"><i class="el-icon-menu"></i>我的资产</template>
                        <el-menu-item index="2-1" @click="goPage('/money')"
<<<<<<< HEAD
                                      :class="{active: url_path === '/money'}">账户余额
                        </el-menu-item>
                        <el-menu-item index="2-2" @click="goPage('/score')"
                                      :class="{active: url_path === '/score'}">我的积分
                        </el-menu-item>
                    </el-submenu>
                    <el-submenu index="3">
                        <template slot="title"><i class="el-icon-setting"></i>个人中心</template>
                        <el-menu-item index="3-1" @click="goPage('/self_center')"
                                      :class="{active: url_path === '/self_center'}">用户信息
                        </el-menu-item>
                        <el-menu-item index="3-2" @click="goPage('/receipt')"
                                      :class="{active: url_path === '/receipt'}">我的发票
                        </el-menu-item>
                        <el-menu-item index="3-3" @click="goPage('/traffic')"
                                      :class="{active: url_path === '/traffic'}">我的违章
                        </el-menu-item>
                        <el-menu-item index="3-4" @click="goPage('/complain')"
                                      :class="{active: url_path === '/complain'}">在线投诉
                        </el-menu-item>
                    </el-submenu>
                </el-menu>
            </el-aside>

=======
                                      :class="{active: url_path === '/money'}">账户余额</el-menu-item>
                        <el-menu-item index="2-2" @click="goPage('/score')"
                                      :class="{active: url_path === '/score'}">我的积分</el-menu-item>
                    </el-submenu>
                    <el-submenu index="3">
                        <template slot="title"><i class="el-icon-setting"></i>个人中心</template>
                        <el-menu-item index="3-1" @click="goPage('/user_info')"
                                      :class="{active: url_path === '/user_info'}">用户信息</el-menu-item>
                        <el-menu-item index="3-2" @click="goPage('/receipt')"
                                      :class="{active: url_path === '/receipt'}">我的发票</el-menu-item>
                        <el-menu-item index="3-3" @click="goPage('/traffic')"
                                      :class="{active: url_path === '/traffic'}">我的违章</el-menu-item>
                        <el-menu-item index="3-4" @click="goPage('/complain')"
                                      :class="{active: url_path === '/complain'}">在线投诉</el-menu-item>
                    </el-submenu>
                </el-menu>
            </el-aside>
>>>>>>> c08a2c9afaf2d3b270a8ee3abf17b8f918215c8e
        </el-container>
    </div>

</template>

<script>
    import Header from "../components/Header";
    import Footer from "../components/Footer";
    import Center from "../components/Center";

    export default {
        name: "self_center",
        components: {Center, Footer, Header},
        data() {
            return {
                url_path: sessionStorage.url_path || '/',
            }
        },
        methods: {
            goPage(url_path) {
                //已经是当前路由就没有必要重新跳转
                if (this.url_path !== url_path) {
                    this.$router.push(url_path);
                }
                sessionStorage.url_path = url_path
            },
        },
        created() {
            sessionStorage.url_path = this.$route.path;
            this.url_path = this.$route.path;
        }
    }
</script>

<style scoped>
    .el-header {
        background-color: #B3C0D1;
        color: #333;
        line-height: 60px;
    }

    .el-aside {
        color: #333;
    }
</style>